package com.xzk.consumer.controller;

import com.xzk.consumer.client.UserClient;
import com.xzk.consumer.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname ControllerFeignController
 * @Description TODO
 * @Date 2020/9/23 12:35
 * @Created by ccc-j
 * @email ccc-ju@outlook.com
 */
@RestController
@RequestMapping("/feign")
public class ControllerFeignController {

    @Autowired
    private UserClient userClient;

    @GetMapping("{id}")
    public User queryById(@PathVariable Long id){
        return userClient.queryById(id);
    }

}
